home *** CD-ROM | disk | FTP | other *** search
- on resize NumDuSprite, NumDuMember, X, Y
- global DoitReadapterTailleImage, tailleorigin, comptetour, choix, theme, types, listefichier, images, jpg
- taille_origine(X, Y, NumDuMember)
- if (DoitReadapterTailleImage = 1) and ((getAt(tailleorigin, 1) > X) or (getAt(tailleorigin, 2) > Y)) then
- compteclic = 0
- set the floatPrecision to 2
- if (float(X) / float(getAt(tailleorigin, 1))) < (float(Y) / float(getAt(tailleorigin, 2))) then
- prctplusreduit = float(X) / float(getAt(tailleorigin, 1)) * 100
- set the height of sprite NumDuSprite to float(getAt(tailleorigin, 2)) * float(prctplusreduit) / 100
- set the width of sprite NumDuSprite to float(getAt(tailleorigin, 1)) * float(prctplusreduit) / 100
- else
- prctplusreduit = float(Y) / float(getAt(tailleorigin, 2)) * 100
- set the width of sprite NumDuSprite to float(getAt(tailleorigin, 1)) * float(prctplusreduit) / 100
- set the height of sprite NumDuSprite to float(getAt(tailleorigin, 2)) * float(prctplusreduit) / 100
- end if
- else
- if (DoitReadapterTailleImage = 1) and ((the width of sprite NumDuSprite > X) or (the height of sprite NumDuSprite > Y)) then
- compteclic = 0
- set the width of sprite NumDuSprite to getAt(tailleorigin, 1)
- set the height of sprite NumDuSprite to getAt(tailleorigin, 2)
- else
- set the width of sprite NumDuSprite to getAt(tailleorigin, 1)
- set the height of sprite NumDuSprite to getAt(tailleorigin, 2)
- end if
- end if
- updateStage()
- end
-
- on taille_origine X, Y, NumDuMember
- global tailleorigin, DoitReadapterTailleImage
- tailleorigin = list(member(NumDuMember).width, member(NumDuMember).height)
- if (getAt(tailleorigin, 1) > X) or (getAt(tailleorigin, 2) > Y) then
- DoitReadapterTailleImage = 1
- else
- DoitReadapterTailleImage = 0
- end if
- end
-